all: sudoku.exe    

CXX = g++
INCLUDES = -I.. 
CXXFLAGS = -g $(INCLUDES) -pedantic
CXXFLAGS += -D USE_HEURISTIC_SELECTION_LIBRARY
OUTPUT_DIR = bin
SOURCES = sudoku/moveHeuristicSelection.cpp  sudoku/evaluationFns.cpp sudoku/sudoku.cpp sudoku/otherFns.cpp sudoku/initialise.cpp 
OBJECTS = $(patsubst %.cpp,$(OUTPUT_DIR)/%.o,$(SOURCES))

init:
	mkdir -p $(OUTPUT_DIR)/sudoku

$(OUTPUT_DIR)/%.o: %.cpp init
	$(CXX) $(CXXFLAGS) -c $< -o $@    

sudoku.exe: ${OBJECTS}
	$(CXX) $(OBJECTS) -o $@

.PHONY: clean

clean:
	\rm *.o 
